<template>
  <div class="dashboard-container">
    <h2>系统概览</h2>
    <el-row :gutter="20">
      <el-col :span="6">
        <el-card class="dashboard-card">
          <template #header>
            <div class="card-header">
              <span>设备总数</span>
            </div>
          </template>
          <div class="card-content">
            <h3>123</h3>
          </div>
        </el-card>
      </el-col>
      <el-col :span="6">
        <el-card class="dashboard-card">
          <template #header>
            <div class="card-header">
              <span>维修工单</span>
            </div>
          </template>
          <div class="card-content">
            <h3>45</h3>
          </div>
        </el-card>
      </el-col>
      <el-col :span="6">
        <el-card class="dashboard-card">
          <template #header>
            <div class="card-header">
              <span>用户数量</span>
            </div>
          </template>
          <div class="card-content">
            <h3>67</h3>
          </div>
        </el-card>
      </el-col>
      <el-col :span="6">
        <el-card class="dashboard-card">
          <template #header>
            <div class="card-header">
              <span>公告数量</span>
            </div>
          </template>
          <div class="card-content">
            <h3>89</h3>
          </div>
        </el-card>
      </el-col>
    </el-row>

    <el-row :gutter="20" class="chart-row">
      <el-col :span="12">
        <el-card class="chart-card">
          <template #header>
            <div class="card-header">
              <span>设备类型分布</span>
            </div>
          </template>
          <div class="chart-content">
            <!-- TODO: 添加图表组件 -->
          </div>
        </el-card>
      </el-col>
      <el-col :span="12">
        <el-card class="chart-card">
          <template #header>
            <div class="card-header">
              <span>维修工单趋势</span>
            </div>
          </template>
          <div class="chart-content">
            <!-- TODO: 添加图表组件 -->
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script setup>
// TODO: 添加数据获取和图表相关逻辑
</script>

<style scoped>
.dashboard-container {
  padding: 20px;
}

.dashboard-card {
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-content {
  text-align: center;
  padding: 20px 0;
}

.card-content h3 {
  margin: 0;
  font-size: 24px;
  color: #409EFF;
}

.chart-row {
  margin-top: 20px;
}

.chart-card {
  margin-bottom: 20px;
}

.chart-content {
  height: 300px;
}
</style>